home *** CD-ROM | disk | FTP | other *** search
/ Delphi 2.0 - Programmer's Utilities Power Pack / Delphi 2.0 Programmer's Utilities Power Pack.iso / e_to_l / itgraph / vb30 / process / process.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-09-15  |  11.6 KB  |  348 lines

  1. VERSION 2.00
  2. Begin Form frmProcess 
  3.    BackColor       =   &H00FFFFFF&
  4.    BorderStyle     =   3  'Fixed Double
  5.    Caption         =   "ITGraph(tm) PROCESS FLOW DEMONSTRATION"
  6.    ClientHeight    =   5124
  7.    ClientLeft      =   3156
  8.    ClientTop       =   2964
  9.    ClientWidth     =   7644
  10.    ControlBox      =   0   'False
  11.    Height          =   5772
  12.    Icon            =   PROCESS.FRX:0000
  13.    Left            =   3108
  14.    LinkTopic       =   "Form1"
  15.    MaxButton       =   0   'False
  16.    MinButton       =   0   'False
  17.    ScaleHeight     =   5124
  18.    ScaleWidth      =   7644
  19.    Top             =   2364
  20.    Width           =   7740
  21.    Begin ITGraph itgProcess 
  22.       ArrangeMode     =   0  'Hierarchical
  23.       AutoArrange     =   0  'Manual Arrange
  24.       AutoMouseEvents =   PROCESS.FRX:0302
  25.       BackColor       =   &H00FFFFFF&
  26.       DragItems       =   0   'False
  27.       DrawArrows      =   -1  'True
  28.       DrawBackLinks   =   2  'ITG_DashedBackLinks
  29.       DrawColored     =   -1  'True
  30.       DrawConnLabels  =   -1  'True
  31.       DrawDir         =   3  'Top To Bottom
  32.       DrawHandles     =   -1  'True
  33.       DrawItemLabels  =   -1  'True
  34.       DrawScale       =   100
  35.       FillColor       =   &H00FFFFFF&
  36.       ForeColor       =   &H00000000&
  37.       Gap             =   10
  38.       GraphicAllowImport=   0  'No Import
  39.       Graphics        =   PROCESS.FRX:0332
  40.       Height          =   1524
  41.       Left            =   4788
  42.       LineWidth       =   0
  43.       PrintHeader     =   ""
  44.       PrintRectHeight =   0
  45.       PrintRectLeft   =   0
  46.       PrintRectTop    =   0
  47.       PrintRectWidth  =   0
  48.       Redraw          =   -1  'True
  49.       RubberBand      =   0  'No RB
  50.       SelectedIndex   =   -1
  51.       SelectRectEnabled=   0   'False
  52.       SelectRectHeight=   0
  53.       SelectRectLeft  =   0
  54.       SelectRectTop   =   0
  55.       SelectRectWidth =   0
  56.       StoreGraphics   =   2  'Save Referenced Graphics
  57.       TabIndex        =   0
  58.       Top             =   36
  59.       Width           =   2712
  60.       XSpace          =   20
  61.       XSpan           =   120
  62.       YSpace          =   20
  63.       YSpan           =   50
  64.    End
  65.    Begin ITGraph itgSubProcess 
  66.       ArrangeMode     =   0  'Hierarchical
  67.       AutoArrange     =   0  'Manual Arrange
  68.       AutoMouseEvents =   PROCESS.FRX:0334
  69.       BackColor       =   &H00FFFFFF&
  70.       DragItems       =   0   'False
  71.       DrawArrows      =   -1  'True
  72.       DrawBackLinks   =   2  'ITG_DashedBackLinks
  73.       DrawColored     =   -1  'True
  74.       DrawConnLabels  =   -1  'True
  75.       DrawDir         =   3  'Top To Bottom
  76.       DrawHandles     =   -1  'True
  77.       DrawItemLabels  =   -1  'True
  78.       DrawScale       =   100
  79.       FillColor       =   &H00FFFFFF&
  80.       ForeColor       =   &H00000000&
  81.       Gap             =   10
  82.       GraphicAllowImport=   0  'No Import
  83.       Graphics        =   PROCESS.FRX:0364
  84.       Height          =   1272
  85.       Left            =   4824
  86.       LineWidth       =   0
  87.       PrintHeader     =   ""
  88.       PrintRectHeight =   0
  89.       PrintRectLeft   =   0
  90.       PrintRectTop    =   0
  91.       PrintRectWidth  =   0
  92.       Redraw          =   -1  'True
  93.       RubberBand      =   0  'No RB
  94.       SelectedIndex   =   -1
  95.       SelectRectEnabled=   0   'False
  96.       SelectRectHeight=   0
  97.       SelectRectLeft  =   0
  98.       SelectRectTop   =   0
  99.       SelectRectWidth =   0
  100.       StoreGraphics   =   2  'Save Referenced Graphics
  101.       TabIndex        =   1
  102.       Top             =   1692
  103.       Width           =   2676
  104.       XSpace          =   20
  105.       XSpan           =   120
  106.       YSpace          =   20
  107.       YSpan           =   50
  108.    End
  109.    Begin Timer timTimer1 
  110.       Interval        =   2000
  111.       Left            =   4356
  112.       Top             =   72
  113.    End
  114.    Begin Label lblMessage 
  115.       BorderStyle     =   1  'Fixed Single
  116.       Caption         =   "lblMessage"
  117.       FontBold        =   0   'False
  118.       FontItalic      =   0   'False
  119.       FontName        =   "MS Sans Serif"
  120.       FontSize        =   7.8
  121.       FontStrikethru  =   0   'False
  122.       FontUnderline   =   0   'False
  123.       Height          =   768
  124.       Left            =   0
  125.       TabIndex        =   2
  126.       Top             =   4356
  127.       Width           =   7644
  128.    End
  129.    Begin Menu Control 
  130.       Caption         =   "&Control"
  131.       Begin Menu Interval 
  132.          Caption         =   "&Interval"
  133.          Begin Menu Interval_onesec 
  134.             Caption         =   "1 sec"
  135.          End
  136.          Begin Menu Interval_twosec 
  137.             Caption         =   "2 sec"
  138.          End
  139.          Begin Menu Interval_foursec 
  140.             Caption         =   "4 sec"
  141.          End
  142.       End
  143.       Begin Menu Run 
  144.          Caption         =   "&Run"
  145.       End
  146.       Begin Menu Pause 
  147.          Caption         =   "&Pause"
  148.       End
  149.       Begin Menu bar 
  150.          Caption         =   "-"
  151.       End
  152.       Begin Menu Exit 
  153.          Caption         =   "E&xit"
  154.       End
  155.    End
  156. Option Explicit
  157. Dim l_seqnum&, i_selitm%, s_tempmsg$
  158. Sub ChangeInterval (newint As Integer)
  159.   Select Case newint
  160.     Case 1:
  161.       Interval_onesec.Checked = True
  162.       Interval_twosec.Checked = False
  163.       Interval_foursec.Checked = False
  164.     Case 2:
  165.       Interval_onesec.Checked = False
  166.       Interval_twosec.Checked = True
  167.       Interval_foursec.Checked = False
  168.     Case 4:
  169.       Interval_onesec.Checked = False
  170.       Interval_twosec.Checked = False
  171.       Interval_foursec.Checked = True
  172.    End Select
  173.   timTimer1.Interval = newint * 1000
  174. End Sub
  175. Sub Exit_Click ()
  176.   End
  177. End Sub
  178. Function FindItemIx (idata As Long) As Integer
  179.   Dim i%
  180.   FindItemIx = -1
  181.   For i = 0 To itgProcess.ListCount - 1
  182.     If itgProcess.ItemData(i) = idata Then
  183.       FindItemIx = i
  184.       Exit Function
  185.     End If
  186.   Next i
  187. End Function
  188. Sub Form_Activate ()
  189.   l_seqnum = 1
  190.   i_selitm = -1
  191.   Pause.Enabled = False
  192. End Sub
  193. Sub Interval_foursec_Click ()
  194.   Call ChangeInterval(4)
  195. End Sub
  196. Sub Interval_onesec_Click ()
  197.   Call ChangeInterval(1)
  198. End Sub
  199. Sub Interval_twosec_Click ()
  200.   Call ChangeInterval(2)
  201. End Sub
  202. Sub itgProcess_DoItemClick (ItemIx As Integer, ItemHandle As Integer)
  203.   Dim Msg$
  204.   Select Case itgProcess.ItemData(ItemIx)
  205.     Case 1:
  206.       Msg = "The process starts when a customer places an order."
  207.       
  208.     Case 2:
  209.       Msg = "When the order is received, shipping instructions are developed "
  210.       Msg = Msg & "and sent to both the Accounting and Shipping departments."
  211.     Case 3:
  212.       Msg = "The Accounting Department develops an invoice, which is sent to the "
  213.       Msg = Msg & "Shipping Department to be included with the shipment.  "
  214.       Msg = Msg & "<DOUBLECLICK FOR DETAILS>"
  215.     Case 4:
  216.       Msg = "Upon receipt of the shipping instructions, the Shipping Department "
  217.       Msg = Msg & "retrieves the ordered goods from inventory and packs the "
  218.       Msg = Msg & "order (goods and invoice) for shipment.  "
  219.     Case 5:
  220.       Msg = "When goods are removed from inventory, a report is sent to Executive "
  221.       Msg = Msg & "Management, indicating the current state of inventory."
  222.     Case 6:
  223.       Msg = "Executive Management receives notice of the order via the daily Order "
  224.       Msg = Msg & "Report which is prepared by the Accounting Department, and is "
  225.       Msg = Msg & "apprised of inventory reductions as goods are shipped.  When the "
  226.       Msg = Msg & "inventory levels fall below replacement thresholds, a Build Order "
  227.       Msg = Msg & "is issued to the Manufacturing Department."
  228.     Case 7:
  229.       Msg = "Upon receipt of a Build Order, the Manufacturing Department manufactures "
  230.       Msg = Msg & "goods to replenish inventory."
  231.     Case Else:
  232.       Msg = ""
  233.   End Select
  234.   itgProcess.ItemFillColor(ItemIx) = YELLOW
  235.   lblMessage = Msg
  236.   If i_selitm > -1 Then
  237.     itgProcess.ItemFillColor(i_selitm) = WHITE
  238.   End If
  239.   i_selitm = ItemIx
  240. End Sub
  241. Sub itgProcess_ItemClick (ItemIx As Integer, ItemHandle As Integer, Button As Integer, Shift As Integer, X As Integer, Y As Integer)
  242.     Call itgProcess_DoItemClick(ItemIx, ItemHandle)
  243. End Sub
  244. Sub itgProcess_ItemDblClick (ItemIx As Integer, ItemHandle As Integer, Button As Integer, Shift As Integer, X As Integer, Y As Integer)
  245.   Dim i%
  246.   If itgProcess.ItemData(ItemIx) = 3 Then
  247.     itgProcess.Height = 20
  248.     itgProcess.Width = 20
  249.     itgProcess.Left = 80
  250.     itgProcess.ItemFillColor(ItemIx) = RED
  251.     itgSubProcess.Visible = True
  252.     itgProcess.Enabled = False
  253.     Run.Enabled = False
  254.     s_tempmsg = lblMessage
  255.     lblMessage = "<DOUBLECLICK ANYWHERE ON THE CHART TO RETURN TO THE MAIN PROCESS FLOW DIAGRAM>"
  256.   End If
  257.   For i = 0 To itgSubProcess.ListCount - 1
  258.     itgSubProcess.ItemFillColor(i) = WHITE
  259.   Next i
  260. End Sub
  261. Sub itgSubProcess_DblClick (Button As Integer, Shift As Integer, X As Integer, Y As Integer)
  262.     Call itgSubProcess_DoDblClick
  263. End Sub
  264. Sub itgSubProcess_DoDblClick ()
  265.   itgProcess.Height = 80
  266.   itgProcess.Width = 100
  267.   itgProcess.Left = 0
  268.   itgProcess.ItemFillColor(i_selitm) = YELLOW
  269.   itgSubProcess.Visible = False
  270.   itgProcess.Enabled = True
  271.   Run.Enabled = True
  272.   lblMessage = s_tempmsg
  273. End Sub
  274. Sub itgSubProcess_ItemClick (ItemIx As Integer, ItemHandle As Integer, Button As Integer, Shift As Integer, X As Integer, Y As Integer)
  275.   Dim i%, Msg$
  276.   If itgSubProcess.ItemData(ItemIx) > 3 Then
  277.     Exit Sub
  278.   End If
  279.   For i = 0 To itgSubProcess.ListCount - 1
  280.     itgSubProcess.ItemFillColor(i) = WHITE
  281.   Next i
  282.   Select Case itgSubProcess.ItemData(ItemIx)
  283.     Case 1:
  284.       Msg = "Upon receipt of the Sales Order, the Account Management Clerk "
  285.       Msg = Msg & "prepares the invoice for the order and forwards it to the "
  286.       Msg = Msg & "Shipping Department.  A copy of the invoice is also provided "
  287.       Msg = Msg & "Accounts Receivables Clerk.  All new sales are included in the "
  288.       Msg = Msg & "daily status report provided to the Accounting Manager."
  289.     Case 2:
  290.       Msg = "The Accounts Receivable Clerk adds the new order to the accounts "
  291.       Msg = Msg & "receivable database."
  292.     Case 3:
  293.       Msg = "The Accounting Manager receives a daily status report from the "
  294.       Msg = Msg & "Account Management Clerk which summarizes all new sales activity."
  295.     Case Else:
  296.       Exit Sub
  297.   End Select
  298.   Msg = Msg & "  <DOUBLECLICK ANYWHERE ON THE CHART TO RETURN TO THE MAIN PROCESS FLOW DIAGRAM>"
  299.   itgSubProcess.ItemFillColor(ItemIx) = YELLOW
  300.   lblMessage = Msg
  301. End Sub
  302. Sub Pause_Click ()
  303.   If Pause.Caption = "&Pause" Then
  304.     timTimer1.Enabled = False
  305.     itgProcess.Enabled = True
  306.     Pause.Caption = "&Continue"
  307.   Else
  308.     timTimer1.Enabled = True
  309.     itgProcess.Enabled = False
  310.     Pause.Caption = "&Pause"
  311.     If itgSubProcess.Visible = True Then
  312.       Call itgSubProcess_DoDblClick
  313.     End If
  314.   End If
  315. End Sub
  316. Sub Run_Click ()
  317.   If Run.Caption = "&Run" Then
  318.     Call itgProcess_DoItemClick(FindItemIx(1), 0)
  319.     l_seqnum = 2
  320.     timTimer1.Enabled = True
  321.     itgProcess.Enabled = False
  322.     Pause.Enabled = True
  323.     Run.Caption = "&Stop"
  324.   Else
  325.     l_seqnum = -1
  326.     itgProcess.ItemFillColor(i_selitm) = WHITE
  327.     timTimer1.Enabled = False
  328.     itgProcess.Enabled = True
  329.     Pause.Enabled = False
  330.     Pause.Caption = "&Pause"
  331.     Run.Caption = "&Run"
  332.   End If
  333. End Sub
  334. Sub timTimer1_Timer ()
  335.   If l_seqnum < 8 Then
  336.     Call itgProcess_DoItemClick(FindItemIx(l_seqnum), 0)
  337.     l_seqnum = l_seqnum + 1
  338.   Else
  339.     l_seqnum = 0
  340.     timTimer1.Enabled = False
  341.     lblMessage = ""
  342.     itgProcess.ItemFillColor(i_selitm) = WHITE
  343.     itgProcess.Enabled = True
  344.     Pause.Enabled = False
  345.     Run.Caption = "&Run"
  346.   End If
  347. End Sub
  348.